﻿using HK.Core.GUIEx.Protocol.Attribute;
using HK.Core.Serializable.Protocol.Attribute;

namespace HK.Core.Serializable.Attribute
{
    /// <summary>
    /// 路径浏览(文件+文件夹)
    /// </summary>
    public class PathBrowseAttribute : GenericFieldAttribute, IPathBrowseAttribute
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="iCaption">标题</param>
        /// <param name="iMode">浏览模式</param>
        /// <param name="iIcon">Icon</param>
        /// <param name="iTips">提示</param>
        /// <param name="iOptions">选项</param>
        public PathBrowseAttribute(string iCaption, PathBrowseMode iMode = PathBrowseMode.File, 
            string iIcon = null, string iTips = null, int iOptions = (int)GUIOperateOptions.PathBrowse) :
            base(iCaption, iIcon, iTips, iOptions)
        {
            Mode = iMode;
        }
        
        /// <summary>
        /// 保护构造函数
        /// </summary>
        private PathBrowseAttribute() : base() {}
        
        /// <summary>
        /// 浏览模式
        /// </summary>
        public PathBrowseMode Mode { get; private set; } = PathBrowseMode.File;
        
        
    }
}
